



<%@page import="com.tubeonfire.entity.Channel" %>
<%@page import="com.tubeonfire.entity.Category" %>
<%@page import="com.tubeonfire.entity.Tube" %>
<%@page import="com.tubeonfire.service.ChannelService" %>
<%@page import="java.util.List" %>
<%	
	request.setCharacterEncoding("UTF-8");
	String url = "http://www.tubeonfire.com/home";
	String title = "TubeOnFire - Mix Something From Utube.";
	String description = "Mix something from youtube. Create an video playlist in seconds with TubeOnFire";
	String keyword = "video clip, youtube, mix clip, tubeonfire.com, tubeonfire, your clip,  sharing, camera phone, video phone, free...";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
<meta charset="UTF-8">  
<title>Detail</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>

<body>	
	<div id="master">
    	<div id="top">
        	<div id="top_inner">
            	<div id="logo">
                	<a href="#"><img src="images/logo.png" alt="tubeonfire" title="tubeonfire" /></a>
                </div>
                <ul id="mainmenu" class="clearafter">                	
                    <li><a href="#">Language</a></li>
                    <li><a href="#">Videos</a></li>
                    <li><a href="#">Channels</a></li>
                    <li><a href="#">Categories</a></li>
                    <li><a href="#">Members</a></li>
                    <li><a href="#">Login</a></li>
                    <li><a href="#">Register</a></li>                    
                </ul>
                <div class="clearbreak"></div>
            </div>
        </div>
        <header>
            <div id="header">
                <div id="header_inner">
                    <div id="search">
                        <form method="post" action="">
                            <input type="text" />
                            <button type="submit" class="button red">Search</button>
                        </form>
                    </div>
                    <div id="video">
                        <div>
                            <iframe width="940" height="342" src="http://www.youtube.com/embed/lGmlmCJH8W4" frameborder="0" allowfullscreen></iframe>
                        </div>
                    </div>
                </div>
            </div>
        </header>
        <div id="content">
        	<div id="content_inner">
            	<div id="leftsidecontent">
           		<%	
					List<Tube> listMostView = (List<Tube>)request.getAttribute("listMostView");
					if(listMostView!=null&&listMostView.size()>0){
				%>
                    <h3 class="button yellow"><a href="#">Most Viewed Today</a></h3>
                    <div class="video-listing">    
                    	<%
                    		for(Tube tub: listMostView){
                    	%>                	
	                    	<div class="video-items clearafter">
	                        	<img src="<%=tub.getThumbImageUrl().getValue() %>" style="width: 220px; height: 110px"/>
	                        <h3><a href="/video/<%=tub.getTubeId() %>/<%=tub.getAlias().getValue() %>.html"><%=tub.getTitle().getValue() %></a></h3>
	                        <p class="video-description">
	                        	<%=(tub.getDescription()==null)?"":tub.getDescription().getValue()%>
	                        </p>
	                        <p class="facets">
	                            <span class="username-prepend">by</span> <a dir="ltr" class="yt-user-name " href="/user/sment"><%=tub.getAuthorName().getValue() %></a>
	                            <span class="metadata-separator">|</span>  <span class="date-added">2 years ago</span>
	                            <span class="metadata-separator">|</span>  <span class="viewcount"><%=tub.getViewCount().getValue() %> views</span>                    
							</p>
	                        </div>  
                        <%
                    		}
                        %>                  	                                      	
                    </div>
                <%
					}
				%>
								
				<%	
					List<Tube> listMostPopular = (List<Tube>)request.getAttribute("listMostPopular");
					if(listMostPopular!=null&&listMostPopular.size()>0){
				%>
                    <h3 class="button orange"><a href="#">Popular video</a></h3>
                    <div class="video-listing">
                    	<%
                    		for(Tube tub: listMostPopular){
                    	%>
	                    	<div class="video-items clearafter">
	                        	<img src="<%=tub.getThumbImageUrl().getValue() %>" style="width: 220px; height: 110px"/>
	                        <h3><a href="/video/<%=tub.getTubeId() %>/<%=tub.getAlias().getValue() %>.html"><%=tub.getTitle().getValue() %></a></h3>
	                        <p class="video-description">
	                        	<%=(tub.getDescription()==null)?"":tub.getDescription().getValue()%>
	                        </p>
	                        <p class="facets">
	                            <span class="username-prepend">by</span> <a dir="ltr" class="yt-user-name " href="/user/sment"><%=tub.getAuthorName().getValue() %></a>
	                            <span class="metadata-separator">|</span>  <span class="date-added">2 years ago</span>
	                            <span class="metadata-separator">|</span>  <span class="viewcount"><%=tub.getViewCount().getValue() %> views</span>                    
							</p>
	                        </div>
                        <%
                    		}
                        %>
                    </div>
                  <%
					}
                  %>
                  <%	
					List<Tube> listMostRecent = (List<Tube>)request.getAttribute("listMostRecent");
					if(listMostRecent!=null&&listMostRecent.size()>0){
					%>
                    <h3 class="button blue"><a href="#">Featured Videos</a></h3>
                    <div class="video-listing">
                    	<%
                    	for(Tube tub: listMostRecent){
                    	%>
                    	<div class="video-items clearafter">
                        	<img src="<%=tub.getThumbImageUrl().getValue() %>" style="width: 220px; height: 110px"/>
                         <h3><a href="/video/<%=tub.getTubeId() %>/<%=tub.getAlias().getValue() %>.html"><%=tub.getTitle().getValue() %></a></h3>
                        <p class="video-description">
                        	<%=(tub.getDescription()==null)?"":tub.getDescription().getValue()%>
                        </p>
                        <p class="facets">
                            <span class="username-prepend">by</span> <a dir="ltr" class="yt-user-name " href="/user/sment"><%=tub.getAuthorName().getValue() %></a>
                            <span class="metadata-separator">|</span>  <span class="date-added">2 years ago</span>
                            <span class="metadata-separator">|</span>  <span class="viewcount"><%=tub.getViewCount().getValue() %> views</span>                    
						</p>
                        </div>
                        <%
                    	}
                        %>
                    </div>
                    <%
					}
					%>
                    <h3 class="button pink"><a href="#">Recommended</a></h3>
                    <div class="video-listing">
                    	<div class="video-items clearafter">
                        	<img src="http://iamthemes.com/themeforest/wordpress/multimedia/wp-content/themes/multidesign/image/post/home-4.png" />
                        <h3><a href="#">SNSD - The Boys (Practice Room Ver.)</a></h3>
                        <p class="video-description">
                        	제시카 JESSICA 유리 YURI 윤아 YOONA 효연 HYOYEON 수영 SOOYOUNG GG
                            <b>SNSD</b>
                            少女時代 SM SMENT SMTOWN SMENTERTAINMENT 에스엠엔터테인먼트 에스엠
                            <b>...</b>
                        </p>
                        <p class="facets">
                            <span class="username-prepend">by</span> <a dir="ltr" class="yt-user-name " href="/user/sment">sment</a>
                            <span class="metadata-separator">|</span>  <span class="date-added">2 years ago</span>
                            <span class="metadata-separator">|</span>  <span class="viewcount">69,722,621 views</span>                    
						</p>
                        </div>
                    </div>
                </div>
                <div id="rightsidecontent">
                	<aside>
                		<%
							List<Channel> listChannel = (List<Channel>) request.getAttribute("listChannel");			
							if(listChannel!=null&&listChannel.size()>0){
						%>
                      
                        <div class="box-blue">
                            <h3 class="title">Channels</h3>
                            <div class="box-content">
                                <ul class="item-listing">
                                	<%
                                		for(Channel tubChannel : listChannel){
                                	%>
                                    <li class="clearafter">
                                        <div class="description">
                                            <h4>
                                            	<a href="/channel/<%=tubChannel.getAlias() %>" title = "<%=tubChannel.getTitle().getValue()%>"><%=tubChannel.getTitle().getValue() %></a>
                                            </h4>
                                            <p><%=tubChannel.getTitle().getValue() %></p>
                                        </div>
                                        <a href="/channel/<%=tubChannel.getAlias() %>" title = "<%=tubChannel.getTitle().getValue()%>">
                                        	<img src="<%=tubChannel.getThumbImageUrl().getValue() %>" alt="<%=tubChannel.getTitle().getValue() %>" title="dragon_hunters" />
                                       	</a>
                                    </li>     
                                    <%
                                		}
                                    %>                              
                                </ul>
                            </div>
                        </div>
                   		<%
							}
                      	%>
                      	<%
							List<Category> listCategory = (List<Category>) request.getAttribute("listCategory");		
							if(listCategory!=null&&listCategory.size()>0){
						%>
                        <div class="box-green">
                            <h3 class="title">Categories</h3>
                            <div class="box-content">
                                <ul class="item-listing">
                                	<%
									for(Category cate: listCategory){
									%>
                                    <li class="clearafter">
                                        <div class="description">
                                            <h4>
                                            	<a href="/category/<%=cate.getAlias() %>"  title="<%=cate.getTitle().getValue()%>">
                                            		<%=cate.getTitle().getValue() %>
                                            	</a>
                                           	</h4>
                                            <p>Games, players will compete in events that take place in .Lorem i...</p>
                                        </div>
                                        <a href="/category/<%=cate.getAlias() %>"  alt="<%=cate.getTitle().getValue()%>"><img src="images/dragon_hunters.png" alt="dragon_hunters" title="dragon_hunters" /></a>
                                    </li>                                    
                                    <%
									}
                                    %>
                                </ul>
                            </div>
                        </div>
                    	<%
							}
                    	%>
                    </aside>
                </div>
                <div class="clearbreak"></div>
            </div>
        </div>
        <footer>
            <div id="footer">
                <div id="footer_inner">
                	
                </div>
            </div>
        </footer>
    </div>
</body>
</html>



